﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAL;

namespace Bll
{
   public class StrRespon
    {
       public StrRespon()
       { 
       
       
       
       }
       //更新客户资料表 返回客户资料信息
       public string customerDetails(string ac)
       {
           DataTable dtCustomer = GetDataTable("select ac_no  from customer where ac_no='" + ac + "'");
           if (dtCustomer.Rows.Count > 0)
           {
               DetailsCustomer dc = new DetailsCustomer(ac);
               //decimal oldPrevbal = decimal.Parse(dtCustomer.Rows[0]["prevbal"].ToString()); //上日结余
               //decimal adjust = decimal.Parse(dtCustomer.Rows[0]["adjust"].ToString()); //今日调整
               //decimal newMargin = decimal.Parse(dtCustomer.Rows[0]["newmargin"].ToString()); //今日出入金
               //decimal equity = decimal.Parse(dtCustomer.Rows[0]["equity"].ToString()); //上日净值
               //decimal liqpnl = 0; //今天的平仓盈亏
               //decimal interest = 0;//今天未平仓利息
               //decimal commission = 0; //今天的平仓手续费
               //decimal floating = 0; //今天的浮动盈亏
               //decimal dmargin = bl.getDmargin(dc); //即市保证金
               //decimal omargin = 0; //过市保证金
               //decimal on_hand = 0;//成交手数

           }
           return "";
       }


       public DataTable GetDataTable(string strSQL)
       {
           DataTable dttemp = null;
           try
           {
               dttemp = SqlHelper.ExecuteDatetable(SqlHelper.SQLConnectionString, strSQL);

           }
           catch (Exception ex)
           {
               ex.GetBaseException();

           }
           return dttemp;
       }

    }
}
